package threadpool.demo;

import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;

/**
 * @author: knowno
 * @create: 2024-09-14 14:24
 * @Version 1.0
 **/
public class TestSeamThread {
    public static void main(String[] args) {

        //创建线程池对象
        ExecutorService executorService = Executors.newFixedThreadPool(20);
        SemaThread semaThread = new SemaThread();

        for (int i = 1; i <=20 ; i++) {
            //调用方法
            executorService.submit(semaThread);
        }


        //释放资源
        executorService.shutdown();

    }
}
